package day13;

import java.io.Serializable;

/**
 * @author oldliu
 * @since 1.0
 */
public class Product implements Serializable {
    private int itemno;
    private String name;
    private double price;
    private int stockcount;
    private boolean discount;
    private String factory;
    private String unit;

    public Product() {
    }

    public Product(int itemno, String name, double price, int stockcount, boolean discount, String factory,
                   String unit) {
        this.itemno = itemno;
        this.name = name;
        this.price = price;
        this.stockcount = stockcount;
        this.discount = discount;
        this.factory = factory;
        this.unit = unit;
    }

    public int getItemno() {
        return itemno;
    }

    public void setItemno(int itemno) {
        this.itemno = itemno;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getStockcount() {
        return stockcount;
    }

    public void setStockcount(int stockcount) {
        this.stockcount = stockcount;
    }

    public boolean isDiscount() {
        return discount;
    }

    public void setDiscount(boolean discount) {
        this.discount = discount;
    }

    public String getFactory() {
        return factory;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Override
    public String toString() {
        return "商品{" +
                "itemno=" + itemno +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", stockcount=" + stockcount +
                ", discount=" + discount +
                ", factory='" + factory + '\'' +
                ", unit='" + unit + '\'' +
                '}';
    }
}
